package Adapter.impl;

import Adapter.service.UserService;

import java.util.*;

/**
 * @author huace
 */
public class UserServiceImpl implements UserService {
    @Override
    public Map<String, String> findById() {
        Map<String, String> map = new LinkedHashMap<>();
        map.put("username", "huace");
        map.put("user_id", "123456");
        return map;
    }

    @Override
    public List<Map<String, String>> findUserList() {
        List<Map<String, String>> list = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            Map<String, String> map = new LinkedHashMap<>();
            map.put("username", String.valueOf((new Random().nextInt(100000))));
            map.put("user_id", "user" + i);
            list.add(map);
        }
        return list;
    }
}
